form method = 'get'
  .panel.panel-default
    .panel-heading
      = link_to "新增" , new_part_salse_path, class: "btn btn-primary btn-xs"

    .panel-body
		.table-responsive
	      table.table.table-bordered.table-hover
	        tr
	          th 零售单号
	          th 客户名称
	          th 备注
	          th 金额
	          th 创建日期
	          th 创建人
	          th 状态
	          th 操作
	          
	        -@part_salses.each do |p|
	          tr
	            td = p.code
	            td = p.customer.name
	            td = p.note
	            td = p.total
	            td = p.created_at.strftime('%Y-%m-%d %H:%M:%S')
	            td = p.user.name
	            td = p.status
	            td
            	  = link_to "查看", part_salse_path(:id => p.id), class: "btn btn-primary btn-xs", style: "margin-right:10px;"
                  = link_to "删除" , part_salse_path(:id => p.id), :method => "DELETE", data: {confirm: '一旦删除,将无法恢复,是否删除?'}, class: "btn btn-danger btn-xs"
                  span class="badge pull-right" #{p.part_salse_details.size}
	              

	       
	          

          